1. Field
This application relates generally to computer graphics, and more specifically to computer systems and processes for efficiently rendering a scene illuminated by indirect light using ray tracing.
2. Related Art
Rendered images used in high quality motion pictures need to be of high quality. Global illumination is a technique used in computer graphics to add more realistic lighting to the scenes. Global illumination takes into account not only the light that comes directly from the light sources placed in the scene (direct illumination), but also light rays that are reflected by other surfaces in the scene (indirect illumination). For example, with direct illumination alone, shadows appear black, because there is no direct illumination in the shadowed areas. By contrast, global illumination allows light to bounce around in the scene before it is finally reflected towards the virtual camera. As a result, details in the shadowed areas may be seen as well.
Traditionally, global illumination is computed using a technique known as the Monte-Carlo ray tracing approach (also known as distributed ray tracing). Path-tracing is a technique which uses this Monte-Carlo approach to generate an image by tracing the path of rays from a virtual camera through pixels in an image plane and then into the scene. Each ray is tested for intersection with the objects in the scene. If a ray hits a surface, the ray tracing algorithm traces through the reflected and/or refracted rays in addition to rays that sample the scene to capture secondary lighting effects, all of which may hit other surfaces in the scene. By recursively tracing all of these rays, a high degree of photorealism may be obtained. At each ray intersection a shading operation may be performed in order to evaluate the correct color contribution due to that intersection.
Monte-Carlo methods use repeated, random sampling to determine a probabilistically likely result. Another Monte-Carlo ray tracing technique—gathering (also known as final gathering)—uses stochastic sampling to randomly send rays out in a hemisphere around a particular location to determine the incoming illumination to that location. This determination is also known as the illumination integral. This method reduces the complexity of sending out an infinite number of dependent reflected and/or refracted rays.
Some scenes are illuminated only by a small amount of indirect lighting. To accurately compute the indirect illumination, these scenes require several orders of magnitude more sample rays to adequately determine the amount of incoming light energy (irradiance) of each sample location without significant background “noise”, which in computer graphics applications may result in the unrealistic and unwanted rendering of illumination. FIGS. 5A-B show examples of a scene illuminated by a small amount of indirect light, resulting in noisy illumination, which may be characterized by spotty shading, non-uniform shading, non-photorealistic shading, low quality shading, or the like. To improve the quality of the image and decrease the noise, orders of magnitude more rays are required to sample the scene.
Global illumination may also be computed using an approach known as photon mapping. In photon mapping, discrete particles of energy, called photons, are emitted from light sources and bounce around the scene. When the photons interact with surfaces within the scene, some of the photons' energy is deposited on the surface. The energy deposits are stored, or mapped, in a structure known as a photon map. The path of the photon is followed until the photon's energy dissipates. This method is very computationally intensive: large numbers of photons are required to adequately sample a scene. Further, photons may interact with surfaces outside the view of the camera, such as those sample locations occluded by other objects in the scene, resulting in unnecessary, time-consuming computation. Finally, the distribution of photons within the scene may be irregular. Many photons may interact with lower energy surfaces, while higher energy surfaces may interact with fewer photons.
Another global illumination approach is known as the point-based global illumination (PBGI) approach. (See Per H. Christensen, “Point-based approximate color bleeding,” Pixar Technical Memo #08-01 (July 2008), hereinafter referred to as “Christensen 2008.”) PBGI involves solving for the indirect illumination integrals and occlusion integrals. Before these integrals are solved, the directly illuminated geometry in the scene is represented by a point cloud representation, which is generated in a pre-computation phase prior to the rendering of the scene.
A point in a point cloud is a position in three dimensional space containing energy information. In one example, a point may be a data representation of a surfel, which is a small circular disk-shaped surface element making up the different objects within a scene. As described in Christensen 2008, the surfaces of different objects are subdivided into small micropolygons, and the light energy emitting (which may include reflected energy) from each micropolygon (e.g., the radiance) is stored with each point. A point can also store other information, including a position, a surface normal, an effective area, a point-radius, and the like. As described in Christensen 2008, the effective area and the point-radius stored in a point are not the same thing; rather, they are two different representations of the size of the point. The point-radius circumscribes the micropolygon that the point represents. This ensures that the surfaces are completely covered by the points with no gaps in between. The effective area is the point's real area, which is smaller than the area corresponding to the point-radius.
Rendering dynamic scenes in low lighting, illuminated only by a small amount of indirect light, is particularly difficult. Using Monte-Carlo ray tracing, photon mapping, or PBGI alone to determine the indirect lighting in these scenes has negative side effects. First, to compute the lighting of a scene using Monte-Carlo ray tracing, and ensure high quality without excessive noise, requires many orders of magnitude more rays than required for well-lit scenes. Calculating the paths of these additional rays significantly increases the computation time required to render a scene. Second, computing the lighting of a scene with photon mapping is extremely computationally intensive, requiring many photons and extraneous computations. Third, using PBGI may result in artifacts that are not pleasing to the eye due to the coarseness of the micropolygons.